from pm4py.objects.petri_net.importer import importer as pnml_importer
net, initial_marking, final_marking = pnml_importer.apply('Petri_net.pnml')
from pm4py.visualization.petri_net import visualizer as pn_visualizer
gviz = pn_visualizer.apply(net, initial_marking, final_marking)
pn_visualizer.view(gviz)

from pm4py.algo.simulation.playout.petri_net import algorithm as simulator
simulated_log = simulator.apply(net, initial_marking, variant=simulator.Variants.BASIC_PLAYOUT,
                                parameters={simulator.Variants.BASIC_PLAYOUT.value.Parameters.NO_TRACES: 20000})

from pm4py.objects.log.exporter.xes import exporter as xes_exporter
# xes_exporter.apply(simulated_log,'log1')
